<%--
  Created by IntelliJ IDEA.
  User: 宝贝嘉燕
  Date: 2021/9/25
  Time: 11:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
pageContext.setAttribute("n1","10");
pageContext.setAttribute("n2","20");
pageContext.setAttribute("n3","30");
pageContext.setAttribute("n4","40");
%>


${ n1 + n2 + n3 }
${1+1} <br/>
${"1"+1} <br/> <%--将字符串转换成数字，然后进行计算 --%>
${'1'+1} <br/> <%--tomcat8的情况是正常的 --%>
<%--  ${'a'+1} <br/>-- 将a转换数字，异常 --%>
${a + 1} <br/> <%--a将从作用域获得数据，如果没有就算空 --%>
<hr>
${ n1 < n2 } - ${ n1 lt n2 } <!-- less than --><br/>
${ n1 > n2 } - ${ n1 gt n2 } <!-- great than --><br/>
${ n1 <= n2 } - ${ n1 le n2 } <!-- less equal --><br/>
${ n1 >= n2 } - ${ n1 ge n2 } <!-- great equal --><br/>
${ n1 == n2 } - ${ n1 eq n2 } <!-- equal --><br/>
<hr>
${ n1<n2 && n3 < n4 } - ${ n1<n2 and n3 < n4 }<br/>
${ n1<n2 || n3 < n4 } - ${ n1<n2 or n3 < n4 }<br/>
${ !(n1 < n2) } - ${ not(n1<n2) }
</body>
</html>00
